package com.gitee.wsl.compose.struct.game

import androidx.compose.runtime.Composable
import com.gitee.wsl.compose.struct.game.ecs.System
import androidx.compose.runtime.key

class ComposableRenderSystem : System() {

    @Composable
    fun Content() {
        entities.forEach { entity ->
            val renderable = world.getComponent<Renderable>(entity)!!

            key(entity) {
                renderable.Content(entity, world)
            }
        }
    }
}